/*
 * XML Type:  FamilyElement
 * Namespace: http:///org/isistan/flabot/coremodel.ecore
 * Java type: org.isistan.flabot.coremodelEcore.FamilyElement
 *
 * Automatically generated - do not modify.
 */
package org.isistan.flabot.coremodelEcore.impl;
/**
 * An XML FamilyElement(@http:///org/isistan/flabot/coremodel.ecore).
 *
 * This is a complex type.
 */
public class FamilyElementImpl extends org.isistan.flabot.coremodelEcore.impl.NamedElementModelImpl implements org.isistan.flabot.coremodelEcore.FamilyElement
{
    private static final long serialVersionUID = 1L;
    
    public FamilyElementImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName USECASEMAP$0 = 
        new javax.xml.namespace.QName("", "useCaseMap");
    private static final javax.xml.namespace.QName FUNCTIONALCOMPONENT$2 = 
        new javax.xml.namespace.QName("", "functionalComponent");
    private static final javax.xml.namespace.QName ARCHITECTURALCOMPONENT$4 = 
        new javax.xml.namespace.QName("", "architecturalComponent");
    private static final javax.xml.namespace.QName USECASEMAP2$6 = 
        new javax.xml.namespace.QName("", "useCaseMap");
    private static final javax.xml.namespace.QName FUNCTIONALCOMPONENT2$8 = 
        new javax.xml.namespace.QName("", "functionalComponent");
    private static final javax.xml.namespace.QName ARCHITECTURALCOMPONENT2$10 = 
        new javax.xml.namespace.QName("", "architecturalComponent");
    
    
    /**
     * Gets array of all "useCaseMap" elements
     */
    public org.isistan.flabot.coremodelEcore.UseCaseMap[] getUseCaseMapArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(USECASEMAP2$6, targetList);
            org.isistan.flabot.coremodelEcore.UseCaseMap[] result = new org.isistan.flabot.coremodelEcore.UseCaseMap[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "useCaseMap" element
     */
    public org.isistan.flabot.coremodelEcore.UseCaseMap getUseCaseMapArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.UseCaseMap target = null;
            target = (org.isistan.flabot.coremodelEcore.UseCaseMap)get_store().find_element_user(USECASEMAP2$6, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "useCaseMap" element
     */
    public int sizeOfUseCaseMapArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(USECASEMAP2$6);
        }
    }
    
    /**
     * Sets array of all "useCaseMap" element  WARNING: This method is not atomicaly synchronized.
     */
    public void setUseCaseMapArray(org.isistan.flabot.coremodelEcore.UseCaseMap[] useCaseMapArray)
    {
        check_orphaned();
        arraySetterHelper(useCaseMapArray, USECASEMAP2$6);
    }
    
    /**
     * Sets ith "useCaseMap" element
     */
    public void setUseCaseMapArray(int i, org.isistan.flabot.coremodelEcore.UseCaseMap useCaseMap)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.UseCaseMap target = null;
            target = (org.isistan.flabot.coremodelEcore.UseCaseMap)get_store().find_element_user(USECASEMAP2$6, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(useCaseMap);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "useCaseMap" element
     */
    public org.isistan.flabot.coremodelEcore.UseCaseMap insertNewUseCaseMap(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.UseCaseMap target = null;
            target = (org.isistan.flabot.coremodelEcore.UseCaseMap)get_store().insert_element_user(USECASEMAP2$6, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "useCaseMap" element
     */
    public org.isistan.flabot.coremodelEcore.UseCaseMap addNewUseCaseMap()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.UseCaseMap target = null;
            target = (org.isistan.flabot.coremodelEcore.UseCaseMap)get_store().add_element_user(USECASEMAP2$6);
            return target;
        }
    }
    
    /**
     * Removes the ith "useCaseMap" element
     */
    public void removeUseCaseMap(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(USECASEMAP2$6, i);
        }
    }
    
    /**
     * Gets array of all "functionalComponent" elements
     */
    public org.isistan.flabot.coremodelEcore.ComponentRole[] getFunctionalComponentArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(FUNCTIONALCOMPONENT2$8, targetList);
            org.isistan.flabot.coremodelEcore.ComponentRole[] result = new org.isistan.flabot.coremodelEcore.ComponentRole[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "functionalComponent" element
     */
    public org.isistan.flabot.coremodelEcore.ComponentRole getFunctionalComponentArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.ComponentRole target = null;
            target = (org.isistan.flabot.coremodelEcore.ComponentRole)get_store().find_element_user(FUNCTIONALCOMPONENT2$8, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "functionalComponent" element
     */
    public int sizeOfFunctionalComponentArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(FUNCTIONALCOMPONENT2$8);
        }
    }
    
    /**
     * Sets array of all "functionalComponent" element  WARNING: This method is not atomicaly synchronized.
     */
    public void setFunctionalComponentArray(org.isistan.flabot.coremodelEcore.ComponentRole[] functionalComponentArray)
    {
        check_orphaned();
        arraySetterHelper(functionalComponentArray, FUNCTIONALCOMPONENT2$8);
    }
    
    /**
     * Sets ith "functionalComponent" element
     */
    public void setFunctionalComponentArray(int i, org.isistan.flabot.coremodelEcore.ComponentRole functionalComponent)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.ComponentRole target = null;
            target = (org.isistan.flabot.coremodelEcore.ComponentRole)get_store().find_element_user(FUNCTIONALCOMPONENT2$8, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(functionalComponent);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "functionalComponent" element
     */
    public org.isistan.flabot.coremodelEcore.ComponentRole insertNewFunctionalComponent(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.ComponentRole target = null;
            target = (org.isistan.flabot.coremodelEcore.ComponentRole)get_store().insert_element_user(FUNCTIONALCOMPONENT2$8, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "functionalComponent" element
     */
    public org.isistan.flabot.coremodelEcore.ComponentRole addNewFunctionalComponent()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.ComponentRole target = null;
            target = (org.isistan.flabot.coremodelEcore.ComponentRole)get_store().add_element_user(FUNCTIONALCOMPONENT2$8);
            return target;
        }
    }
    
    /**
     * Removes the ith "functionalComponent" element
     */
    public void removeFunctionalComponent(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(FUNCTIONALCOMPONENT2$8, i);
        }
    }
    
    /**
     * Gets array of all "architecturalComponent" elements
     */
    public org.isistan.flabot.coremodelEcore.ComponentRole[] getArchitecturalComponentArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(ARCHITECTURALCOMPONENT2$10, targetList);
            org.isistan.flabot.coremodelEcore.ComponentRole[] result = new org.isistan.flabot.coremodelEcore.ComponentRole[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "architecturalComponent" element
     */
    public org.isistan.flabot.coremodelEcore.ComponentRole getArchitecturalComponentArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.ComponentRole target = null;
            target = (org.isistan.flabot.coremodelEcore.ComponentRole)get_store().find_element_user(ARCHITECTURALCOMPONENT2$10, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "architecturalComponent" element
     */
    public int sizeOfArchitecturalComponentArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(ARCHITECTURALCOMPONENT2$10);
        }
    }
    
    /**
     * Sets array of all "architecturalComponent" element  WARNING: This method is not atomicaly synchronized.
     */
    public void setArchitecturalComponentArray(org.isistan.flabot.coremodelEcore.ComponentRole[] architecturalComponentArray)
    {
        check_orphaned();
        arraySetterHelper(architecturalComponentArray, ARCHITECTURALCOMPONENT2$10);
    }
    
    /**
     * Sets ith "architecturalComponent" element
     */
    public void setArchitecturalComponentArray(int i, org.isistan.flabot.coremodelEcore.ComponentRole architecturalComponent)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.ComponentRole target = null;
            target = (org.isistan.flabot.coremodelEcore.ComponentRole)get_store().find_element_user(ARCHITECTURALCOMPONENT2$10, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(architecturalComponent);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "architecturalComponent" element
     */
    public org.isistan.flabot.coremodelEcore.ComponentRole insertNewArchitecturalComponent(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.ComponentRole target = null;
            target = (org.isistan.flabot.coremodelEcore.ComponentRole)get_store().insert_element_user(ARCHITECTURALCOMPONENT2$10, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "architecturalComponent" element
     */
    public org.isistan.flabot.coremodelEcore.ComponentRole addNewArchitecturalComponent()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.ComponentRole target = null;
            target = (org.isistan.flabot.coremodelEcore.ComponentRole)get_store().add_element_user(ARCHITECTURALCOMPONENT2$10);
            return target;
        }
    }
    
    /**
     * Removes the ith "architecturalComponent" element
     */
    public void removeArchitecturalComponent(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(ARCHITECTURALCOMPONENT2$10, i);
        }
    }
    
    /**
     * Gets the "useCaseMap" attribute
     */
    public java.lang.String getUseCaseMap2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(USECASEMAP2$6);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "useCaseMap" attribute
     */
    public org.apache.xmlbeans.XmlString xgetUseCaseMap2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(USECASEMAP2$6);
            return target;
        }
    }
    
    /**
     * True if has "useCaseMap" attribute
     */
    public boolean isSetUseCaseMap2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(USECASEMAP2$6) != null;
        }
    }
    
    /**
     * Sets the "useCaseMap" attribute
     */
    public void setUseCaseMap2(java.lang.String useCaseMap2)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(USECASEMAP2$6);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(USECASEMAP2$6);
            }
            target.setStringValue(useCaseMap2);
        }
    }
    
    /**
     * Sets (as xml) the "useCaseMap" attribute
     */
    public void xsetUseCaseMap2(org.apache.xmlbeans.XmlString useCaseMap2)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(USECASEMAP2$6);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(USECASEMAP2$6);
            }
            target.set(useCaseMap2);
        }
    }
    
    /**
     * Unsets the "useCaseMap" attribute
     */
    public void unsetUseCaseMap2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(USECASEMAP2$6);
        }
    }
    
    /**
     * Gets the "functionalComponent" attribute
     */
    public java.lang.String getFunctionalComponent2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(FUNCTIONALCOMPONENT2$8);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "functionalComponent" attribute
     */
    public org.apache.xmlbeans.XmlString xgetFunctionalComponent2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(FUNCTIONALCOMPONENT2$8);
            return target;
        }
    }
    
    /**
     * True if has "functionalComponent" attribute
     */
    public boolean isSetFunctionalComponent2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(FUNCTIONALCOMPONENT2$8) != null;
        }
    }
    
    /**
     * Sets the "functionalComponent" attribute
     */
    public void setFunctionalComponent2(java.lang.String functionalComponent2)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(FUNCTIONALCOMPONENT2$8);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(FUNCTIONALCOMPONENT2$8);
            }
            target.setStringValue(functionalComponent2);
        }
    }
    
    /**
     * Sets (as xml) the "functionalComponent" attribute
     */
    public void xsetFunctionalComponent2(org.apache.xmlbeans.XmlString functionalComponent2)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(FUNCTIONALCOMPONENT2$8);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(FUNCTIONALCOMPONENT2$8);
            }
            target.set(functionalComponent2);
        }
    }
    
    /**
     * Unsets the "functionalComponent" attribute
     */
    public void unsetFunctionalComponent2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(FUNCTIONALCOMPONENT2$8);
        }
    }
    
    /**
     * Gets the "architecturalComponent" attribute
     */
    public java.lang.String getArchitecturalComponent2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ARCHITECTURALCOMPONENT2$10);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "architecturalComponent" attribute
     */
    public org.apache.xmlbeans.XmlString xgetArchitecturalComponent2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(ARCHITECTURALCOMPONENT2$10);
            return target;
        }
    }
    
    /**
     * True if has "architecturalComponent" attribute
     */
    public boolean isSetArchitecturalComponent2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(ARCHITECTURALCOMPONENT2$10) != null;
        }
    }
    
    /**
     * Sets the "architecturalComponent" attribute
     */
    public void setArchitecturalComponent2(java.lang.String architecturalComponent2)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ARCHITECTURALCOMPONENT2$10);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(ARCHITECTURALCOMPONENT2$10);
            }
            target.setStringValue(architecturalComponent2);
        }
    }
    
    /**
     * Sets (as xml) the "architecturalComponent" attribute
     */
    public void xsetArchitecturalComponent2(org.apache.xmlbeans.XmlString architecturalComponent2)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(ARCHITECTURALCOMPONENT2$10);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(ARCHITECTURALCOMPONENT2$10);
            }
            target.set(architecturalComponent2);
        }
    }
    
    /**
     * Unsets the "architecturalComponent" attribute
     */
    public void unsetArchitecturalComponent2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(ARCHITECTURALCOMPONENT2$10);
        }
    }
}
